home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 233 / Computer Shopper 233 / ComputerShopperDVD233.iso / Assets / Interface / Main.dxr / Movie Scripts_9_Other functions- colours, strings.ls < prev    next >
Encoding:
Text File  |  2005-05-17  |  628 b   |  23 lines

  1. on strToRGB colStr
  2.   splitPosn = offset(",", colStr)
  3.   r = integer(colStr.char[1..splitPosn - 1])
  4.   remainder = colStr.char[splitPosn + 1..colStr.length]
  5.   splitPosn = offset(",", remainder)
  6.   g = integer(remainder.char[1..splitPosn - 1])
  7.   b = integer(remainder.char[splitPosn + 1..remainder.length])
  8.   return color(#rgb, r, g, b)
  9. end
  10.  
  11. on toUppercase str
  12.   ucStr = EMPTY
  13.   repeat with charNum = 1 to str.length
  14.     charPosn = charToNum(str.char[charNum])
  15.     if charPosn > 96 then
  16.       ucStr = ucStr & numToChar(charPosn - 32)
  17.       next repeat
  18.     end if
  19.     ucStr = ucStr & str.char[charNum]
  20.   end repeat
  21.   return ucStr
  22. end
  23.